package app.sys.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Date;

/**
 * 基础Model, 包含了status(逻辑删),  operation（userId), 以及operationTime（操作时间)
 * status会保证自动插入后插入正常状态， operation和operationTime也会自动生成对应的值
 */
public class BaseModel {
    @JsonIgnore
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    protected Integer status;
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT_UPDATE)
    protected Long operator;
//    @JsonIgnore
    @TableField(fill = FieldFill.INSERT_UPDATE)
    protected Date operateTime;


    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getOperator() {
        return operator;
    }

    public void setOperator(Long operator) {
        this.operator = operator;
    }

    public Date getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(Date operateTime) {
        this.operateTime = operateTime;
    }
}
